package com.ninetaildemonfox.zdl.socialproject.mvp.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lzy.imagepicker.bean.ImageItem;
import com.ninetaildemonfox.zdl.socialproject.R;
import com.ninetaildemonfox.zdl.socialproject.utils.GlideUtils;

import java.util.List;

/**
 * 创建人： Nine tails fox
 * 创建时间： 2019/8/13
 * 功能描述：
 * 联系方式：1037438704@qq.com
 *
 * @author NineTailDemonFox
 */

public class ImageViewAdp extends BaseQuickAdapter<ImageItem, BaseViewHolder> {
    public ImageViewAdp(int imageview) {
        super(imageview);
    }

    @Override
    protected void convert(BaseViewHolder helper, ImageItem item) {
        ImageView imagePice = helper.itemView.findViewById(R.id.image_pice);
        if (item.name.equals("1")) {
            GlideUtils.glideFille(mContext, R.mipmap.ic_add_icon, imagePice);
        } else {
            GlideUtils.glideFille(mContext, item.path, imagePice);
        }
    }
}
